Optimal. Leaf size=139 \[ \frac {3 a^2 x}{2}-\frac {15 a^2 \tanh ^{-1}(\cos (c+d x))}{4 d}+\frac {2 a^2 \cos (c+d x)}{d}+\frac {a^2 \cot (c+d x)}{d}-\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {9 a^2 \cot (c+d x) \csc (c+d x)}{4 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 139, normalized size of antiderivative = 1.00, number of steps
used = 15, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2788, 3855,
3853, 3852, 2718, 2715, 8} \begin {gather*} \frac {2 a^2 \cos (c+d x)}{d}-\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {a^2 \cot (c+d x)}{d}+\frac {a^2 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {15 a^2 \tanh ^{-1}(\cos (c+d x))}{4 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac {9 a^2 \cot (c+d x) \csc (c+d x)}{4 d}+\frac {3 a^2 x}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 2718
Rule 2788
Rule 3852
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \cot ^6(c+d x) (a+a \sin (c+d x))^2 \, dx &=\frac {\int \left (2 a^8+6 a^8 \csc (c+d x)-6 a^8 \csc ^3(c+d x)-2 a^8 \csc ^4(c+d x)+2 a^8 \csc ^5(c+d x)+a^8 \csc ^6(c+d x)-2 a^8 \sin (c+d x)-a^8 \sin ^2(c+d x)\right ) \, dx}{a^6}\\ &=2 a^2 x+a^2 \int \csc ^6(c+d x) \, dx-a^2 \int \sin ^2(c+d x) \, dx-\left (2 a^2\right ) \int \csc ^4(c+d x) \, dx+\left (2 a^2\right ) \int \csc ^5(c+d x) \, dx-\left (2 a^2\right ) \int \sin (c+d x) \, dx+\left (6 a^2\right ) \int \csc (c+d x) \, dx-\left (6 a^2\right ) \int \csc ^3(c+d x) \, dx\\ &=2 a^2 x-\frac {6 a^2 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {2 a^2 \cos (c+d x)}{d}+\frac {3 a^2 \cot (c+d x) \csc (c+d x)}{d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d}-\frac {1}{2} a^2 \int 1 \, dx+\frac {1}{2} \left (3 a^2\right ) \int \csc ^3(c+d x) \, dx-\left (3 a^2\right ) \int \csc (c+d x) \, dx-\frac {a^2 \text {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,\cot (c+d x)\right )}{d}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {3 a^2 x}{2}-\frac {3 a^2 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {2 a^2 \cos (c+d x)}{d}+\frac {a^2 \cot (c+d x)}{d}-\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {9 a^2 \cot (c+d x) \csc (c+d x)}{4 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{4} \left (3 a^2\right ) \int \csc (c+d x) \, dx\\ &=\frac {3 a^2 x}{2}-\frac {15 a^2 \tanh ^{-1}(\cos (c+d x))}{4 d}+\frac {2 a^2 \cos (c+d x)}{d}+\frac {a^2 \cot (c+d x)}{d}-\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {9 a^2 \cot (c+d x) \csc (c+d x)}{4 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.01, size = 264, normalized size = 1.90 \begin {gather*} \frac {a^2 (1+\sin (c+d x))^2 \left (240 (c+d x)+320 \cos (c+d x)+64 \cot \left (\frac {1}{2} (c+d x)\right )+90 \csc ^2\left (\frac {1}{2} (c+d x)\right )-5 \csc ^4\left (\frac {1}{2} (c+d x)\right )-600 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+600 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-90 \sec ^2\left (\frac {1}{2} (c+d x)\right )+5 \sec ^4\left (\frac {1}{2} (c+d x)\right )-56 \csc ^3(c+d x) \sin ^4\left (\frac {1}{2} (c+d x)\right )+\frac {7}{2} \csc ^4\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)-\frac {1}{2} \csc ^6\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)+40 \sin (2 (c+d x))-64 \tan \left (\frac {1}{2} (c+d x)\right )+\sec ^4\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )\right )}{160 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 217, normalized size = 1.56
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\left (\cot ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}-\cot \left (d x +c \right )-d x -c \right )+2 a^{2} \left (-\frac {\cos ^{7}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}+\frac {3 \left (\cos ^{7}\left (d x +c \right )\right )}{8 \sin \left (d x +c \right )^{2}}+\frac {3 \left (\cos ^{5}\left (d x +c \right )\right )}{8}+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{8}+\frac {15 \cos \left (d x +c \right )}{8}+\frac {15 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+a^{2} \left (-\frac {\cos ^{7}\left (d x +c \right )}{3 \sin \left (d x +c \right )^{3}}+\frac {4 \left (\cos ^{7}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )}+\frac {4 \left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )}{d}\) | \(217\) |
default | \(\frac {a^{2} \left (-\frac {\left (\cot ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}-\cot \left (d x +c \right )-d x -c \right )+2 a^{2} \left (-\frac {\cos ^{7}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}+\frac {3 \left (\cos ^{7}\left (d x +c \right )\right )}{8 \sin \left (d x +c \right )^{2}}+\frac {3 \left (\cos ^{5}\left (d x +c \right )\right )}{8}+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{8}+\frac {15 \cos \left (d x +c \right )}{8}+\frac {15 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+a^{2} \left (-\frac {\cos ^{7}\left (d x +c \right )}{3 \sin \left (d x +c \right )^{3}}+\frac {4 \left (\cos ^{7}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )}+\frac {4 \left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )}{d}\) | \(217\) |
risch | \(\frac {3 a^{2} x}{2}-\frac {i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {a^{2} {\mathrm e}^{i \left (d x +c \right )}}{d}+\frac {a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{d}+\frac {i a^{2} {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}-\frac {a^{2} \left (45 \,{\mathrm e}^{9 i \left (d x +c \right )}+80 i {\mathrm e}^{6 i \left (d x +c \right )}-50 \,{\mathrm e}^{7 i \left (d x +c \right )}-80 i {\mathrm e}^{4 i \left (d x +c \right )}+80 i {\mathrm e}^{2 i \left (d x +c \right )}+50 \,{\mathrm e}^{3 i \left (d x +c \right )}-16 i-45 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{10 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5}}+\frac {15 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{4 d}-\frac {15 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{4 d}\) | \(220\) |
norman | \(\frac {-\frac {a^{2}}{160 d}-\frac {a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{32 d}+\frac {3 a^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}+\frac {7 a^{2} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}+\frac {79 a^{2} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}+\frac {47 a^{2} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}-\frac {47 a^{2} \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}-\frac {79 a^{2} \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}-\frac {7 a^{2} \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}-\frac {3 a^{2} \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}+\frac {a^{2} \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}+\frac {a^{2} \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}+\frac {3 a^{2} x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+3 a^{2} x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {3 a^{2} x \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {95 a^{2} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}+\frac {95 a^{2} \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {15 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}\) | \(352\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 184, normalized size = 1.32 \begin {gather*} \frac {20 \, {\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} + 10 \, \tan \left (d x + c\right )^{2} - 2}{\tan \left (d x + c\right )^{5} + \tan \left (d x + c\right )^{3}}\right )} a^{2} - 8 \, {\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} - 5 \, \tan \left (d x + c\right )^{2} + 3}{\tan \left (d x + c\right )^{5}}\right )} a^{2} - 15 \, a^{2} {\left (\frac {2 \, {\left (9 \, \cos \left (d x + c\right )^{3} - 7 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - 16 \, \cos \left (d x + c\right ) + 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{120 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 265 vs.
\(2 (127) = 254\).
time = 0.42, size = 265, normalized size = 1.91 \begin {gather*} -\frac {20 \, a^{2} \cos \left (d x + c\right )^{7} - 92 \, a^{2} \cos \left (d x + c\right )^{5} + 140 \, a^{2} \cos \left (d x + c\right )^{3} - 60 \, a^{2} \cos \left (d x + c\right ) + 75 \, {\left (a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 75 \, {\left (a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 10 \, {\left (6 \, a^{2} d x \cos \left (d x + c\right )^{4} + 8 \, a^{2} \cos \left (d x + c\right )^{5} - 12 \, a^{2} d x \cos \left (d x + c\right )^{2} - 25 \, a^{2} \cos \left (d x + c\right )^{3} + 6 \, a^{2} d x + 15 \, a^{2} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{40 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 272 vs.
\(2 (127) = 254\).
time = 0.54, size = 272, normalized size = 1.96 \begin {gather*} \frac {a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 5 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 5 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 80 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 240 \, {\left (d x + c\right )} a^{2} + 600 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 70 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {160 \, {\left (a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 4 \, a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}} - \frac {1370 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 70 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 80 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 5 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{160 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.90, size = 363, normalized size = 2.61 \begin {gather*} \frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{32\,d}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{32\,d}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2\,d}+\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}+\frac {15\,a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}+\frac {-18\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+144\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+61\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+159\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {79\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{5}+14\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{5}-a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {a^2}{5}}{d\,\left (32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+64\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\right )}+\frac {3\,a^2\,\mathrm {atan}\left (\frac {9\,a^4}{\frac {45\,a^4}{2}-9\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {45\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,\left (\frac {45\,a^4}{2}-9\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}\right )}{d}-\frac {7\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________